-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[vulkan-validationlayers] Add support for Android #25281
[vulkan-validationlayers] Add support for Android #25281
Conversation
Signed-off-by: Uilian Ries <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
This comment has been minimized.
This comment has been minimized.
Hooks produced the following warnings for commit b142e9avulkan-validationlayers/1.3.236.0@#3388e48a9f6a8ccb0367f0292efabe81
vulkan-validationlayers/1.3.239.0@#a2d4061c3fe64329d788f1c8acccefcc
|
Adding build for Android using all shared: vulkan-validationlayers-1.3.224.1-android-shared.log However, it's an invalid configuration:
|
Signed-off-by: Uilian Ries <[email protected]>
Signed-off-by: Uilian Ries <[email protected]>
This comment has been minimized.
This comment has been minimized.
Signed-off-by: Uilian Ries <[email protected]>
This comment has been minimized.
This comment has been minimized.
Hooks produced the following warnings for commit 0f35628vulkan-validationlayers/1.3.239.0@#96531e7cf3c6ff3841b3087f5ac87f7f
vulkan-validationlayers/1.3.236.0@#57861d36fea8ad782dc5d4c902081203
|
Here are some traces running on an android device via $ emu64a:/data/local/tmp $ ls -l
total 308708
-rwxrwxrwx 1 shell shell 311645688 2024-09-18 10:46 libVkLayer_khronos_validation.so
-rw-rw-rw- 1 shell shell 3144174 2024-09-18 10:46 libVkLayer_utils.a
-rwxrwxrwx 1 shell shell 1302824 2024-09-18 10:46 test_package
$ emu64a:/data/local/tmp $ ./test_package
VK_FORMAT_D16_UNORM is depth only
Looking good! |
This comment has been minimized.
This comment has been minimized.
Hooks produced the following warnings for commit 391ced9vulkan-validationlayers/1.3.239.0@#6433c810dcc5b3f3c6797bda897aa350
vulkan-validationlayers/1.3.236.0@#c77f08b64afe049dd7061c28aca54924
|
# INFO: libVkLayer_utils.a: error: undefined symbol: __android_log_print | ||
# https://github.com/KhronosGroup/Vulkan-ValidationLayers/commit/a26638ae9fdd8c40b56d4c7b72859a5b9a0952c9 | ||
replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), | ||
"VkLayer_utils PUBLIC Vulkan::Headers", "VkLayer_utils PUBLIC Vulkan::Headers -landroid -llog") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably needs
self.cpp_info.system_libs.extend(["android", "log"])
as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you're right, this is the way to fix the issue @perseoGI
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is still needed that replace_in_file as we saw, the issue was on the linkage stage, not during the consumption of the library.
Compilation traces with all shared except $ conan create recipes/vulkan-validationlayers/all --version 1.3.224.1 --build=missing -pr:h android-packed -pr:b default -o '!spirv-tools/*:shared=True'
Compilation traces, all dependencies statically linked: $ conan create recipes/vulkan-validationlayers/all --version 1.3.224.1 --build=missing -pr:h android-packed -pr:b default
|
Conan v1 pipeline ✔️All green in build 6 (
Conan v2 pipeline ✔️
All green in build 6 (
|
Hooks produced the following warnings for commit 0537c8fvulkan-validationlayers/1.3.239.0@#f447f725d431b558ff174ab8b72259d3
vulkan-validationlayers/1.3.236.0@#df49e1fde02fbec9a349fbc1db91572d
|
* Build vulkan-validationlayers for Android Signed-off-by: Uilian Ries <[email protected]> * update package type to static type Signed-off-by: Uilian Ries <[email protected]> * Add fPIC option Signed-off-by: Uilian Ries <[email protected]> * Fix fpic management on Windows Signed-off-by: Uilian Ries <[email protected]> * Remove Wayland support on Android * Added system_libs for android --------- Signed-off-by: Uilian Ries <[email protected]> Co-authored-by: PerseoGI <[email protected]>
Summary
Changes to recipe: vulkan-validationlayers/1.3.224.1
Motivation
The
vulkan-validationlayers
Conan recipe is not well supported for Android, this PR fixes the current state.Current error:
Details
Full build log for Android:
vulkan-validationlayers-1.3.224.1-android-static.log